package test.y2019.october;

import cn.hutool.core.convert.Convert;
import cn.hutool.core.lang.Console;

import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author song
 * @date 2019/10/8 10:43
 */
public class October1 {

    /**
     * Author song  醉美柳舞之众星捧月
     * Date & Time  2019/10/8 10:44
     * Description   转换类型
     */

    public static void main(String[] args) {
        /* 金额转换 */
        double money = 67556.32;
        String digitUppercase = Convert.digitToChinese(money);
        Console.error(digitUppercase);
        /* ------------------------------------------------------------------------ */

        /* 时间转换 */
        long time = 4535345;
        long minutes = Convert.convertTime(time, TimeUnit.MILLISECONDS, TimeUnit.MINUTES);
        Console.error(minutes);
        /* ------------------------------------------------------------------------ */

        /* 半角转全角 */
        String minNum = "123456789";
        String sbc = Convert.toSBC(minNum);
        Console.error(sbc);
        /* 全角转半角 */
        String maxNum = "１２３４５６７８９";
        String dbc = Convert.toDBC(maxNum);
        Console.error(dbc);
        /* ------------------------------------------------------------------------ */

        /* 日期转换 */
        String date = "2017-05-06";
        Date value = Convert.toDate(date);
        Console.error(value);
    }
}
